From: Jyrki Gadinger Date: Wed, 19 Mar 2025 09:31:47 +0000 (+0100) Subject: explicitly set colours for header items X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~1^2~1^2~2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=fa5d3bc2f6d6c93bdf923216c4837b57ddc6cb15;p=nextcloud-desktop.git explicitly set colours for header items the _Universal_ theme notably sets [`icon.color` on `Button`s][0] and also the [`color` on `Label`s][1], ignoring what's set through the `palette` property ... [0]: https://github.com/qt/qtdeclarative/blob/215619d71b69be02348e12dc2dfea087c3ec2abb/src/quickcontrols/universal/Button.qml#L23 [1]: https://github.com/qt/qtdeclarative/blob/215619d71b69be02348e12dc2dfea087c3ec2abb/src/quickcontrols/universal/Label.qml#L12 Signed-off-by: Jyrki Gadinger --- diff --git a/src/gui/tray/CurrentAccountHeaderButton.qml b/src/gui/tray/CurrentAccountHeaderButton.qml index 787470f9a..ca3a3a5ec 100644 --- a/src/gui/tray/CurrentAccountHeaderButton.qml +++ b/src/gui/tray/CurrentAccountHeaderButton.qml @@ -198,6 +198,7 @@ Button { id: currentAccountUser Layout.alignment: Qt.AlignLeft | Qt.AlignBottom width: Style.currentAccountLabelWidth + color: palette.windowText text: UserModel.currentUser ? UserModel.currentUser.name : "" elide: Text.ElideRight @@ -209,6 +210,7 @@ Button { id: currentAccountServer Layout.alignment: Qt.AlignLeft | Qt.AlignBottom width: Style.currentAccountLabelWidth + color: palette.windowText text: UserModel.currentUser ? UserModel.currentUser.server : "" elide: Text.ElideRight visible: UserModel.numUsers() > 1 @@ -225,6 +227,7 @@ Button { id: emoji visible: UserModel.currentUser && UserModel.currentUser.statusEmoji !== "" width: Style.userStatusEmojiSize + color: palette.windowText text: UserModel.currentUser ? UserModel.currentUser.statusEmoji : "" } EnforcedPlainTextLabel { @@ -233,6 +236,7 @@ Button { Layout.fillWidth: true visible: UserModel.currentUser && UserModel.currentUser.statusMessage !== "" width: Style.currentAccountLabelWidth + color: palette.windowText text: UserModel.currentUser && UserModel.currentUser.statusMessage !== "" ? UserModel.currentUser.statusMessage : UserModel.currentUser ? UserModel.currentUser.server : "" diff --git a/src/gui/tray/HeaderButton.qml b/src/gui/tray/HeaderButton.qml index 6bdcb2876..b133a7532 100644 --- a/src/gui/tray/HeaderButton.qml +++ b/src/gui/tray/HeaderButton.qml @@ -32,6 +32,7 @@ Button { icon.width: Style.headerButtonIconSize icon.height: Style.headerButtonIconSize + icon.color: "transparent" Layout.alignment: Qt.AlignRight Layout.preferredWidth: Style.trayWindowHeaderHeight